//
//  GCMAboutTaskTableViewCell.m
//  GeeCityManager
//
//  Created by 聚城科技 on 16/3/22.
//  Copyright © 2016年 聚城科技. All rights reserved.
//

#import "GCMAboutTaskTableViewCell.h"

@implementation GCMAboutTaskTableViewCell{
    
    UIView * _bgView;
    UILabel *_titleLabel;
    UILabel *_SLRLabel;
    UILabel *_HXLabel;
    UILabel *_ZTLabel;
    UILabel *_CLSJLabel;
    UILabel *_DFSJLabel;
    UILabel *_CNSJLabel;
}
-(instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier{
    
    if ([super initWithStyle:style reuseIdentifier:reuseIdentifier]) {
        [self createUI];
    }
    return self;
}

-(void)createUI{
    
    _bgView = [[UIImageView alloc]init];
    _bgView.frame =CGRectMake(10, 10,SCREEN_WIDTH - 20, 160);
    _bgView.backgroundColor = [UIColor whiteColor];
    [self.contentView addSubview:_bgView];
    
    _titleLabel = [[UILabel alloc]init];
    _titleLabel.frame = CGRectMake(0,0,_bgView.bounds.size.width, 30);
    //_titleLabel.font = [UIFont systemFontOfSize:15];
    //    _titleLabel.textColor = [UIColor lightGrayColor];
    _titleLabel.textAlignment = NSTextAlignmentCenter;
    [_bgView addSubview:_titleLabel];
    
    _SLRLabel = [[UILabel alloc]init];
    _SLRLabel.frame = CGRectMake(20 ,30 , _bgView.bounds.size.width - 40, 20);
    _SLRLabel.font = [UIFont systemFontOfSize:14];
    _SLRLabel.textColor = [UIColor colorWithRed:0.58 green:0.65 blue:0.65 alpha:1.00];
    _SLRLabel.textAlignment = NSTextAlignmentLeft;
    [_bgView addSubview:_SLRLabel];
    
    _HXLabel = [[UILabel alloc]init];
    _HXLabel.frame = CGRectMake(20,50, _bgView.bounds.size.width - 40,20 );
    _HXLabel.font = [UIFont systemFontOfSize:14];
    _HXLabel.textAlignment = NSTextAlignmentLeft;
    _HXLabel.textColor = [UIColor colorWithRed:0.58 green:0.65 blue:0.65 alpha:1.00];
    [_bgView addSubview:_HXLabel];
    
    _ZTLabel = [[UILabel alloc]init];
    _ZTLabel.frame = CGRectMake(20,70, _bgView.bounds.size.width - 40,20 );
    _ZTLabel.font = [UIFont systemFontOfSize:14];
    _ZTLabel.textAlignment = NSTextAlignmentLeft;
    _ZTLabel.textColor = [UIColor colorWithRed:0.58 green:0.65 blue:0.65 alpha:1.00];
    [_bgView addSubview:_ZTLabel];

    _CLSJLabel = [[UILabel alloc]init];
    _CLSJLabel.frame = CGRectMake(20,90, _bgView.bounds.size.width - 40,20 );
    _CLSJLabel.font = [UIFont systemFontOfSize:14];
    _CLSJLabel.textAlignment = NSTextAlignmentLeft;
    _CLSJLabel.textColor = [UIColor colorWithRed:0.58 green:0.65 blue:0.65 alpha:1.00];
    [_bgView addSubview:_CLSJLabel];
    
    _DFSJLabel = [[UILabel alloc]init];
    _DFSJLabel.frame = CGRectMake(20,110, _bgView.bounds.size.width - 40,20 );
    _DFSJLabel.font = [UIFont systemFontOfSize:14];
    _DFSJLabel.textAlignment = NSTextAlignmentLeft;
    _DFSJLabel.textColor = [UIColor colorWithRed:0.58 green:0.65 blue:0.65 alpha:1.00];
    [_bgView addSubview:_DFSJLabel];
    
    _CNSJLabel = [[UILabel alloc]init];
    _CNSJLabel.frame = CGRectMake(20,130, _bgView.bounds.size.width - 40,20 );
    _CNSJLabel.font = [UIFont systemFontOfSize:14];
    _CNSJLabel.textAlignment = NSTextAlignmentLeft;
    _CNSJLabel.textColor = [UIColor colorWithRed:0.58 green:0.65 blue:0.65 alpha:1.00];
    [_bgView addSubview:_CNSJLabel];
    
}

-(void)setAboutModel:(GCMAboutTaskModel *)aboutModel{
    
    _aboutModel = aboutModel;
    _titleLabel.text = [NSString stringWithFormat:@"[%@][%@][%@]",_aboutModel.state,_aboutModel.type,_aboutModel.level];
    _SLRLabel.text = [NSString stringWithFormat:@"派单 ： 受理人 ： %@",_aboutModel.receiver];
    _HXLabel.text = [NSString stringWithFormat:@"后续受理人：%@",_aboutModel.followReceiver];
    _ZTLabel.text = [NSString stringWithFormat:@"任务主题：%@",_aboutModel.content];
    _CLSJLabel.text = [NSString stringWithFormat:@"处理时间：%@",_aboutModel.handleTime];
    _DFSJLabel.text = [NSString stringWithFormat:@"答复时间：%@",_aboutModel.answerTime];
    _CNSJLabel.text = [NSString stringWithFormat:@"承诺时间：%@",_aboutModel.promiseTime];
    
    
    
}

- (void)awakeFromNib {
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
